package com.example.demo;

import com.example.demo.Controller.TestController;
import com.example.demo.Controller.UController;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class DemoApplication {

	public static void main(String[] args) {

		ApplicationContext context = SpringApplication.run(DemoApplication.class, args);
	TestController controller =	context.getBean(TestController.class);
	controller.doController();
	TestController controller1 = (TestController) context.getBean("testController");
	controller1.doController();

		UController uController = context.getBean(UController.class);
		uController.fun();
		UController uController1 = (UController) context.getBean("UController");
		uController1.fun();
	}

}
